<?php
/**
 * Created by PhpStorm.
 * User: chl
 * Date: 2017/3/21 0021
 * Time: 15:12
 */
namespace app\admin\validate;
use think\Validate;
class Product extends Validate{
    protected $rule = [
        ['name','require','产品名必填'],
        ['duration','require','时长必选'],
        ['discounted_price','require|>:0','首次优惠价必填|优惠价格必须大于0'],
        ['market_pricr','require|>:0','续费/市场价必填|市场价格必须大于0'],
    ];
    protected $scene = [
        'productAdd' => ['name','duration','discounted_price','market_price'],
        'productSave' =>['name','duration','discountte_price','market_price'],
    ];
}